<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <base href="#(basePath)"/>
  <title>数据字典</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="static/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="static/admin.css" media="all">
  <style>
  #groups, #children{min-height: 400px;}
  #groups li{padding:4px;margin-bottom:2px;}
  #groups li:hover {background-color:#eee;}
  .layui-card-header, #groups .layui-card-body li{position: relative;}
  .group-body-right span{cursor: pointer;padding:5px;margin-left:6px;background-color:#ccc;}
  .header-right{position: absolute; right: 0px; top: 0px;
    width: 26px;
    height: 26px;
    padding: 5px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
  }
  .group-body-left{height: 26px;line-height: 26px;margin-right:80px;}
  .group-body-right{position: absolute; right: 6px; top: 0px;width: 60px;height: 26px;padding: 2px;line-height: 26px;text-align: right;}
  </style>
</head>
<body>
	<div style="padding: 20px; background-color: #F2F2F2;">
	  <div class="layui-row layui-col-space15">
	    <div class="layui-col-md4" id="groups">
	      <div class="layui-card">
	        <div class="layui-card-header">
	        	<span>分组</span>
	        	<span class="header-right" title="新增"><i class="layui-icon layui-icon-add-1"></i></span>
	        </div>
	        <div class="layui-card-body">
	        </div>
	      </div>
	    </div>
	    <div class="layui-col-md8" id="children">
	      <div class="layui-card">
	        <div class="layui-card-header">
	        	<span>字典</span>
	        	<span class="header-right" title="新增" parentCode=""><i class="layui-icon layui-icon-add-1"></i></span>
	        </div>
	        <div class="layui-card-body">
		        <table id="LAY-web-list" lay-filter="LAY-web-list"></table> 
		        <script type="text/html" id="table-content-list">
          			<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="update"><i class="layui-icon layui-icon-edit"></i>编辑</a>
					<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><i class="layui-icon layui-icon-delete"></i>删除</a>
        		</script>
	        </div>
	      </div>
	    </div>
	  </div>
	</div> 

  <script src="static/layui/layui.js"></script>
  <script>
  layui.config({
    base: '#(basePath)' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'table', 'dictionary'], function(){
	var dic = layui.dictionary;
	// 初始化分组
	dic.initGroups();
	// 新增组
	dic.setOpenAddGroup();
	// 新增字典
	dic.setOpenAddItem();
	
  });
  </script>
</body>
</html>
